"""这个模块用于游戏当中的各项设置"""
class Setting:
    """初始化游戏的设置"""
    def __init__(self):
        self.screen_width = 1200 
        self.screen_height = 800 
        self.bg_color = (255,255,255)
        #对于飞船的各项属性进行进行操控
        self.ship_limit = 3

        #对于舰队的速度进行操控
        self.fleet_drop_speed = 10 
        #使用fleet_direction 为 1 表示向右移动,0 表示向左移动
        self.fleet_direction = 1

        #对于子弹进行设置
        self.bullet_width = 3
        self.bullet_height = 15
        self.bullet_color = (60,60,60)
        self.bullet_num = 10

        self.speedup_scale = 1.1
        self.initalize_dynamic_set()

    def initalize_dynamic_set(self):
        """负责初始化随着游戏升级而变化的设置"""
        self.ship_speed = 1.5 
        self.bullet_speed = 2.5
        self.alien_speed = 1.0 
        self.fleet_direction = 1
    
    def increase_speed(self):
        """用于动态调整速度设置的值"""
        self.ship_speed *= self.speedup_scale
        self.bullet_speed *= self.speedup_scale
        self.alien_speed *= self.speedup_scale